<template>
  <a-input
    :value="props.value"
    @update:value="emit('update:value', $event)"
    @click.prevent="handleClick"
  ></a-input>
  <span>{{ msg }}</span>
</template>

<script setup lang="ts">
const props = defineProps({
  value: {
    type: String,
    default: "",
  },
});
const msg = ref(props.value);

const emit = defineEmits(["update:value"]);

const handleClick = () => {
};
watch(
  () => props.value,
  (v) => {
    msg.value = v;
  },
  {
    immediate: true,
  }
);
</script>

<style scoped></style>
